<%@ page import="org.apache.shiro.SecurityUtils" %>
<%@ page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>榆林市社会性别统计平台</title>
    <c:set var="auth" value="${authentication}"/>
    <c:set var="contextPathLocal" value="${pageContext.request.contextPath}"/>
    <c:set var="userName" value="<%=SecurityUtils.getSubject().getPrincipal()%>"/>
<%--    <link rel="shortcut icon" href="${contextPathLocal}/resources/images/favicon.ico" />--%>
    <link rel="stylesheet" type="text/css" href="${contextPathLocal}/resources/jquery.loadmask.css" />
    <link rel="stylesheet" type="text/css" href="${contextPathLocal}/resources/easyUI/themes/gray/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${contextPathLocal}/resources/easyUI/icon.css" />
    <link rel="stylesheet" type="text/css" href="${contextPathLocal}/resources/style.css" />
    <script type="text/javascript" src="${contextPathLocal}/resources/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="${contextPathLocal}/resources/js/jquery.easyui.min.js"></script>
    <script type='text/javascript' src='${contextPathLocal}/resources/js/jquery.loadmask.js'></script>
    <script type='text/javascript' src='${contextPathLocal}/resources/js/util.js'></script>
</head>

<body class="easyui-layout" id="ibody">

<div data-options="region:'north',border:false" style="height:auto;overflow:hidden;">
    <div class="title_head">
        <div class="title_logoText">
<%--            <img alt="陕西省榆林市分性别统计分析系统" src="${contextPathLocal}/resources/icon/icon-del.png">--%>
            <strong>榆林市社会性别统计平台</strong>
        </div>

        <div class="title_login">
            <a href="javaScript:void(0)" id='show'>
                <img src="${contextPathLocal}/resources/images/menu.png">
                <span style="color: #FFFFFF;">主菜单&nbsp;&nbsp;</span>
            </a>

            <a href="javaScript:void(0)" >
                <img src="${contextPathLocal}/resources/images/user.png">
                <span style="color: #FFFFFF;"><%=SecurityUtils.getSubject().getPrincipal()%>&nbsp;&nbsp;</span>
            </a>

            <a href="/logout.do" >
                <img src="${contextPathLocal}/resources/images/exit.png">
                <span style="color: #FFFFFF;">退出&nbsp;&nbsp;</span>
            </a>

            <div class='title_headRi' id="menu_ul" style="display:none;">
                <ul>
                    <li class="current">报表</li>
                    <shiro:hasPermission name="menuManager:show">
                        <li class="xt_text" style="background-color: #ffffff;border: 1px solid #1196db;"><a href="${contextPathLocal}/manager.do">系统管理</a></li>
                    </shiro:hasPermission>
                </ul>
            </div>
        </div>
    </div>
</div>

<div id="tt" data-options="region:'west',split:true,title:'菜单'" style="width:220px">
    <div style="width: 100%; height: 100%">
        <ul style="margin: 0; padding: 0">

<%--            <shiro:hasPermission name="mapView:show">--%>
<%--                <li class="systemBtn" id="li_mapbtn" style="height: 90px;">--%>
<%--					<span class="systemSpan">--%>
<%--						<a id="mapbtn" class="systemA btn_font" href="javascript:;">--%>
<%--						<b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/mapbtn.png') no-repeat 0 0"></b>--%>
<%--						<b class="icon2" id="icon_li_mapbtn"></b>数据地图</a>--%>
<%--					</span>--%>
<%--                    <ul class="systemUl">--%>
<%--                        <shiro:hasPermission name="mapProvince:show">--%>
<%--                            <li>--%>
<%--                                <span class="systemUl_span">--%>
<%--                                <a href="javascript:;" class="systemUl_a subBtn btn_font" url="${contextPathLocal}/report/view/mapView.do?show=province">全省数据地图</a>--%>
<%--                                </span>--%>
<%--                            </li>--%>
<%--&lt;%&ndash;                            <li>&ndash;%&gt;--%>
<%--&lt;%&ndash;                                <span class="systemUl_span">&ndash;%&gt;--%>
<%--&lt;%&ndash;                                    <a href="javascript:;" class="systemUl_a subBtn btn_font" url="${contextPathLocal}/report/view/mapView.do?show=city">地市数据地图</a>&ndash;%&gt;--%>
<%--&lt;%&ndash;                                </span>&ndash;%&gt;--%>
<%--&lt;%&ndash;                            </li>&ndash;%&gt;--%>
<%--                        </shiro:hasPermission>--%>
<%--                    </ul>--%>
<%--                </li>--%>
<%--            </shiro:hasPermission>--%>

            <shiro:hasPermission name="alertView:show">
                <li class="systemBtn" id="li_alertbtn">
					<span class="systemSpan">
						<a id="alertbtn"  class="systemA btn_font" href="javascript:;">
						<b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/alertbtn.png') no-repeat 0 0"></b>
						<b class="icon" id="icon_li_alertbtn"></b>监测预警</a>
					</span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="alertViewPro:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmView.do?show=province">省级数据预警</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="alertViewCity:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmView.do?show=city">市级数据预警</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="alertViewCounty:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmView.do?show=county">区县监测数据预警</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="jianceViewPro:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/monitorView.do?show=provinceRate">省级监测指标达标率</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="jianceViewCity:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/monitorView.do?show=cityRate">市级监测指标达标率</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="jianceViewCounty:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/monitorView.do?show=countyRate">区县级监测指标达标率</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>

            <shiro:hasPermission name="sexView:show">
                <li class="systemBtn" id="li_sexbtn">
					<span class="systemSpan">
						<a id="sexbtn"  class="systemA btn_font" href="javascript:;">
						<b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/usermag.png') no-repeat 0 0"></b>
						<b class="icon" id="icon_li_sexbtn"></b>分性别统计数据查询</a>
					</span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="sexViewPro:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/sex/sexView.do?show=province">省级分性别统计数据查询</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="sexViewCity:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/sex/sexView.do?show=city">市级分性别统计数据查询</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="sexViewCounty:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/sex/sexView.do?show=county">区县级分性别统计数据查询</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>

            <shiro:hasPermission name="analysisView:show">
                <li class="systemBtn" id="li_department">
					<span class="systemSpan">
						<a id="department"  class="systemA btn_font" href="javascript:;"><b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/department.png') no-repeat 0 0"></b><b class="icon" id="icon_li_department"></b>数据查询与分析</a>
					</span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="analysisViewDepart:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=mixProCity">省、地市数据对比</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewDepart:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=mixCityCounty">地市、区县数据对比</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewDepartPro:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=province">省级分部门数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewDepartCity:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=city">市级分部门数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewDepartCounty:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=county">区县级分部门数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewTypePro:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=fieldProvince">省级分领域数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewTypeCity:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=fieldCity">市级分领域数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="analysisViewTypeCounty:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/analysis/analysisView.do?show=fieldCounty">区县级分领域数据查询</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>


            <shiro:hasPermission name="reportAddView:show">
                <li class="systemBtn" id="li_progressbtn">
					<span class="systemSpan">
						<a id="progressbtn"  class="systemA btn_font" href="javascript:;" ><b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/progressbtn.png') no-repeat 0 0"></b><b class="icon" id="icon_li_progressbtn"></b>上报进度与汇总报表</a>
					</span>
                    <ul class="systemUl">

                        <shiro:hasPermission name="reportAddViewPro:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/aggregateView.do?show=province">查看省级上报进度</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="reportAddViewCity:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/aggregateView.do?show=city">查看市级上报进度</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="reportAddViewCounty:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/aggregateView.do?show=county">查看区县上报进度</a>
                        </span>
                            </li>
                        </shiro:hasPermission>


                        <shiro:hasPermission name="reportPoolViewPro:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/collectView.do?show=province">汇总省级报表</a>
							</span>
                            </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="reportPoolViewCity:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/collectView.do?show=city">汇总报表</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="reportPoolViewCounty:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/view/collectView.do?show=county">汇总区县报表</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>


            <shiro:hasPermission name="reportInputView:show">
                <li class="systemBtn" id="li_dataentrybtn">
					<span class="systemSpan">
						<a id="dataentrybtn"  class="systemA btn_font" href="javascript:;"><b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/dataentrybtn.png') no-repeat 0 0"></b><b class="icon" id="icon_li_dataentrybtn"></b>数据录入</a>
					</span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="reportInputViewAdd:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;"  url="${contextPathLocal}/report/view/addView.do?show=add">录入</a>
                        </span>
                            </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="reportInputViewImport:show">
                        <li>
                            <span class="systemUl_span">
                                <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/import/view.do?show=import">导入</a>
                            </span>
                        </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="reportInputViewQurey:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;"  url="${contextPathLocal}/report/view/selfView.do?show=self">查询</a>
                        </span>
                            </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="reportInputViewQureyPrealarm:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;"  url="${contextPathLocal}/report/view/selfView.do?show=prealarm">预警指标查询</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>


            <shiro:hasPermission name="noticeView:show">
                <li class="systemBtn" id="li_systematic">
					<span class="systemSpan">
						<a id="systematic"  class="systemA btn_font" href="javascript:;">
						<b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/systematic.png') no-repeat 0 0"></b>
						<b class="icon" id="icon_li_systematic"></b>通知与公告</a>
					</span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="noticeViewSub:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/bulletin/view.do?show=user">通知与公告</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="noticeViewAdmin:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/bulletin/view.do?show=admin">管理</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>


            <%--
            <li class="systemBtn" id="li_user">
					<span class="systemSpan">
						<a id="user" class="systemA btn_font" href="javascript:;"><b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/user.png') no-repeat 0 0"></b><b class="icon" id="icon_li_user"></b>文档资料</a>
					</span>
                <ul class="systemUl">
                    <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/filedata/view.do?show=regulations">查阅制度资料</a>
							</span>
                    </li>
                    <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/filedata/view.do?show=share">检索共享文件</a>
							</span>
                    </li>
                </ul>
            </li>
            --%>


            <shiro:hasPermission name="personalView:show">
                <li class="systemBtn" id="li_personal">
                <span class="systemSpan">
                    <a id="personal" class="systemA btn_font" href="javascript:;">
                    <b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/input.png') no-repeat 0 0"></b>
                    <b class="icon" id="icon_li_personal"></b>个人中心</a>
                </span>
                    <ul class="systemUl">
                        <shiro:hasPermission name="personalViewSelf:show">
                            <c:if test="${!(userName eq 'admin')}">
                                <li>
                            <span class="systemUl_span">
                                <a class="systemUl_a subBtn btn_font" href="javascript:;"  url="${contextPathLocal}/personalCenter/viewDepartment.do">个人信息</a>
                            </span>
                                </li>
                            </c:if>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="personalViewPass:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/personalCenter/view.do?show=changePassword">修改密码</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                    </ul>
                </li>
            </shiro:hasPermission>

            <shiro:hasPermission name="configView:show">
                <li class="systemBtn" id="li_configurationbtn">
					<span class="systemSpan">
						<a id="configurationbtn"  class="systemA btn_font" href="javascript:;">
						<b class="picBtn" style="background: url('${contextPathLocal}/resources/icon/configurationbtn.png') no-repeat 0 0"></b>
						<b class="icon" id="icon_li_configurationbtn"></b>配置管理</a>
					</span>

                    <ul class="systemUl">
                        <shiro:hasPermission name="configReportView:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/forms/view.do?show=view">报表类型</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="configUnitView:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/manager/unit/view.do?show=unit">单位管理</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="configIndicatorTypeView:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/indicator/type/view.do?show=type">报表/领域</a>
							</span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="configIndicatorView:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/indicator/view.do?show=indicator">指标管理</a>
							</span>
                            </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="configDepartIndicatorView:show">
                            <li>
							<span class="systemUl_span">
								<a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/forms/depart/view.do?show=depart">部门指标设置</a>
							</span>
                            </li>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="alertConfigViewPro:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmConfigView.do?show=province">省级预警目标值设定</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="alertConfigViewCity:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmConfigView.do?show=city">市级预警目标值设定</a>
                        </span>
                            </li>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="alertConfigViewCounty:show">
                            <li>
                        <span class="systemUl_span">
                            <a class="systemUl_a subBtn btn_font" href="javascript:;" url="${contextPathLocal}/report/prealarm/prealarmConfigView.do?show=county">县级预警目标值设定</a>
                        </span>
                            </li>
                        </shiro:hasPermission>

                    </ul>

                </li>
            </shiro:hasPermission>

        </ul>
    </div>
</div>

<div data-options="region:'center'" id="tabView">
    <div id="tabs" class="easyui-tabs" style="width: 100%;" data-options="border:false">
        <div id="center">
            <iframe name="mainIframe" id="mainIframe" frameborder="0" src="" style="width: 100%;"></iframe>
        </div>
    </div>
</div>
</body>

<script type="text/javascript">

    window.onresize = function () {
        $("#ibody").css({'minWidth':768+'px'});
    }

    var userDefinedColumnFilterMap = new Object();
    var systemContextPath = '';
    function getSystemContextPath() {
        return systemContextPath;
    }

    (function () {

        $("#ibody").css({'minWidth':768+'px'});

        //鼠标悬浮显示报表 以及系统管理
        $('.title_login>a[id]').hover(function(){
            $('#menu_ul').slideDown(300);
        },function(){
            this.timer=setTimeout(function(){
                $('#menu_ul').hide();
            }, 50)
        });

        $('#menu_ul').hover(function(){
            clearTimeout(document.getElementById('show').timer);
            $('#menu_ul').slideDown(300);
        },function(){
            $('#menu_ul').hide();
        });

    })();


    $(function () {

        var tabView = $('#tabView');
        var mainIframe = $('#mainIframe');
        mainIframe.css({height:tabView.height()-49});

        var centerPanel =  $("#ibody").layout("panel","center");
        centerPanel.panel({
            onResize:function(){
                mainIframe.css({height:tabView.height()-49});
            }
        })

        if ($('.title_headRi li.current').length == 0) {
            location.href = $('.title_headRi > ul > li > a:first').attr('href');
        }

        $(".subBtn").click(function (e) {
            unmask();
            var _t = $(e.target);
            var title = $(_t).text();
            var exists = $('#tabs').tabs('exists', title);
            closeTabs();
            var tab = $('#tabs').tabs('getSelected');
            $('#tabs').tabs('update', {
                tab: tab,
                options: {
                    title: $(_t).text()
                }
            });
            var url = $(_t).attr('url');
            if (url.indexOf("?") > 0) {
                url = url + "&" + Math.round(new Date().getTime() / 1000);
            } else {
                url = url + "?" + Math.round(new Date().getTime() / 1000);
            }
            $("#mainIframe").attr('src', url);

        });
        $(".subBtn:first").click();

        $("#tabs").tabs({
            onSelect: function (title) {
                var divs = $('#tabs .panel-body.panel-body-noheader.panel-body-noborder');
                if (divs && divs.length > 0) {
                    for (var i = 0; i < divs.length; i++) {
                        if ($(divs[i]).is(':visible')) {
                            var cdiv = divs[i];
                            var ht = $(cdiv).height();
                            $(cdiv).height(ht - 1);//重新设置一下div的高度
                            break;
                        }
                    }
                }
            }
        });

        $(".systemA").click(function () {
            var id = "li_"+this.id;
            for(var i=0; i<$(".systemBtn").length; i++){
                if(id==$(".systemBtn")[i].id){
                    document.getElementById("icon_"+$(".systemBtn")[i].id).className = "icon"
                    $("#"+$(".systemBtn")[i].id).animate({height:"50px"});
                }
            }
            animate(this.id,$(this).parents('.systemBtn').children(".systemUl").children('li').length*40+50);
        })

    });

    function animate(id,size) {
        if($("#li_"+id).height()==size){
            $("#li_"+id).animate({height:"50px"});
            document.getElementById("icon_li_"+id).className = "icon"
        }
        else {
            $("#li_"+id).animate({height:size+"px"});
            document.getElementById("icon_li_"+id).className = "icon2"
        }
    }


    function addTab(title, content, source) {
        var exists = $('#tabs').tabs('exists', title);
        if (exists) {
            $('#tabs').tabs('select', title);
        } else {
            $("#tabs").tabs('add', {
                id: source,
                title: title,
                content: content,
                closable: true
            });
        }
    }

    function closeTabs() {
        var tabs = $('#tabs').tabs("tabs");
        var length = tabs.length;
        for (var i = 1; i < length; i++) {
            var tab = tabs[1];
            var title = tab.panel('options').tab.text();
            $("#tabs").tabs("close", title);
        }
    }

    function mask() {
        $("#tabs").mask("Waiting...");
    }
    function unmask() {
        $("#tabs").unmask();
    }
</script>
</html>